package com.atguigu.realtime.util;

import java.util.concurrent.LinkedBlockingDeque;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;

/**
 * @author chenlongStart
 * @create 2021-06-29 19:38
 * @desc
 */
public class ThreadPoolUtil {
    public static ThreadPoolExecutor getThreadPool(){
        return new ThreadPoolExecutor(
                100,
                300,
                300,
                TimeUnit.SECONDS,
                new LinkedBlockingDeque<>(100)//阻塞队列中最多存储的请求数
        );
    }
}
